import util from '../../utils/util.js';

const request = util.http;


export default {
  //搜索股票
  searchProduct(params) {
    return request({
      url: '/finance/searchProduct',
      params: params,
      type: 'get'
    })
  },

  //根据ID查询股票
  getFinanceProduct(params) {
    return request({
      url: '/finance/getFinanceProduct',
      params: params,
      type: 'get'
    })
  },
  //买入
  buyUserProduct(params) {
    return request({
      url: '/finance/buyUserProduct',
      params: params,
      type: 'post'
    })
  },
  //卖出
  sellUserProduct(params) {
    return request({
      url: '/finance/sellUserProduct',
      params: params,
      type: 'post'
    })
  },
}